package com.sys.api.util;

import com.sys.api.token.JwtUtil;

import javax.servlet.http.HttpServletRequest;

public class SysUserUtil {
    public static String getUserId(HttpServletRequest request){
        // 从 http 请求头中取出 token
        String token = request.getHeader("token");
        String userId=JwtUtil.getUserId(token);
        return userId;
    }
}
